package com.yanqu.road.server.cmd.activity.unionwar;

import com.yanqu.road.pb.cross.activity.CrossActivityProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.cross.CrossDataMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;
import io.netty.channel.ChannelHandlerContext;

@Cmd(code = Protocol.S_UNION_WAR_SYNC_RANK, desc = "群英争霸排行同步")
public class UnionWarRankListSyncCmd implements Command {

    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        CrossActivityProto.UnionWarRankMsgMsg unionWarRankMsg = CrossActivityProto.UnionWarRankMsgMsg.parseFrom(packet.getBytes());
        CrossDataMgr.unionWarRankListSync(unionWarRankMsg);
    }
}
